﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Dispatcher;
using System.Text;

namespace NhJump.Persistence.Context.WcfBinding
{
    /// <summary>
    /// Used by WCF in order to build a persistence context
    /// </summary>
    public class WcfUnitOfWorkBuilder : IInstanceContextInitializer 
    {
        public void Initialize(System.ServiceModel.InstanceContext instanceContext, System.ServiceModel.Channels.Message message)
        {
            instanceContext.Extensions.Add(new WcfUnitOfWorkExtension(null));
        }
    }
}
